build: Make /etc/kernel scripts default to automatic
authorColin Walters <walters@verbum.org>
Thu, 23 Aug 2012 19:19:41 +0000 (15:19 -0400)
committerColin Walters <walters@verbum.org>
Thu, 23 Aug 2012 19:19:41 +0000 (15:19 -0400)
When not cross compiling, we can test for /etc/kernel.  This fixes the
build automatically on RHEL6 for example.

configure.ac

index 6f32df30d12d26474b8c09283e456237a923d52d..9f0bca310511d75f9d7c47380902ca320901a963 100644 (file)
@@ -97,11 +97,15 @@ AS_IF([ test x$with_libarchive != xno ], [
 ])
 AM_CONDITIONAL(USE_LIBARCHIVE, test $with_libarchive != no)
 
+AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel],
+      [kernel_updates_default=yes],
+      [kernel_updates_default=no])
+
 AC_ARG_ENABLE(kernel-updates,
               AS_HELP_STRING([--enable-kernel-updates],
              [Install configuration scripts to handle kernel updates
               in the host system]), ,
-             enable_kernel_updates=yes)
+             enable_kernel_updates=${kernel_updates_default})
 AM_CONDITIONAL(ENABLE_KERNEL_UPDATES, test $enable_kernel_updates != no)
 
 AC_CONFIG_FILES([